/*!
 * Simplex Admin Template - Version 1.0
 *
 * Copyright 2011, Prosoftware.pl Dominik Cwiklik
 * @see http://www.prosoftware.pl/simplex-admin-template/
 * @license MIT http://www.opensource.org/licenses/mit-license.php
 *
 * Includes jQuery | http://jquery.com/ | Copyright 2011, John Resig | Dual licensed under the MIT or GPL Version 2 licenses.
 * Includes Uni-form | http://sprawsm.com/uni-form/ | Copyright (c) 2010, Dragan Babic | Released under the MIT License.
 * Includes Facebox | http://defunkt.io/facebox/ | Copyright (c) 2007/2008 Chris Wanstrath  | Released under the MIT License.
 *
 * Date: Fri Mar 25 00:29:24 2011
 */

window.onload = function() {
	document.getElementById("email").focus();
};

jQuery(document).ready(function($) {
	$('a[rel*=facebox]').facebox() 
})

$(function(){

	
	$('#email,#pass').click(function(){
		$(this).removeClass('simpleError');
	});
	
	$('#loginBtn').click(function(e){

		var fieldsOk = true;
		
		if ($('#email').val().length == 0)
		{
			fieldsOk = false;
			$('#email').addClass('simpleError');
		}

		if ($('#pass').val().length == 0)
		{
			fieldsOk = false;
			$('#pass').addClass('simpleError');
		}

		return fieldsOk ? true : false;
	});
	
});